#ifndef SHUI_DRAWINGSURFACE_H
#define SHUI_DRAWINGSURFACE_H

#include <QWidget>
#include "tool/defines.h"

QT_FORWARD_DECLARE_CLASS(QPixmap);

namespace ShUi
{

class DrawingSurfaceImpl;
class DrawingSurface : public QWidget
{
    Q_OBJECT
public:
    explicit DrawingSurface(QWidget *parent = 0);
    ~DrawingSurface();
    
protected:
    void keyPressEvent(QKeyEvent* evt);
    void keyReleaseEvent(QKeyEvent* evt);
    void mouseDoubleClickEvent(QMouseEvent* evt);
    void mousePressEvent(QMouseEvent* evt);
    void mouseMoveEvent(QMouseEvent* evt);
    void mouseReleaseEvent(QMouseEvent* evt);
    void paintEvent(QPaintEvent* evt);
    void resizeEvent(QResizeEvent* evt);
    void enterEvent(QEvent* evt);
    void leaveEvent(QEvent* evt);
    void wheelEvent(QWheelEvent* evt);

signals:
    
public slots:
    void setBgColor(const QColor& color);
    void setPenColor(const QColor& color);
    void setPenWidth(int width);

private:
    SH_DISABLE_COPY(DrawingSurface);
    SH_DECLARE_IMPL(DrawingSurface);
};

} // namespace ShUi

#endif // SHUI_DRAWINGSURFACE_H
